package com.yic.module.system.controller.admin.code.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 编号规则 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class CodeRespVO extends CodeBaseVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9637")
    private Long id;

    @Schema(description = "创建人")
    private String creator;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime createTime;

    @Schema(description = "编码规则", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<Rule> rules;


    @Schema(description = "规则")
    @Data
    public static class Rule {

        @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        private Long id;

        @Schema(description = "规则类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "字符串")
        private String type;

        @Schema(description = "规则标准", requiredMode = Schema.RequiredMode.REQUIRED, example = "字符串")
        private String param;

        @Schema(description = "规则标准", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
        private Integer serial;

    }

}
